# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Markus Härer <markus.haerer@gmx.net>
# Contributor: robotanarchy
# Contributor: Philipp Trommler <aur@philipp-trommler.me>

pkgname=minted
pkgver=2.6
pkgrel=3
pkgdesc='Syntax highlighted source code for LaTeX'
url='https://github.com/gpoore/minted'
arch=(any)
license=(LPPL)
depends=(fvextra python-pygments texlive-latexextra which)
source=("$pkgname-$pkgver.tar.gz::https://github.com/gpoore/minted/archive/v$pkgver.tar.gz"
        minted.install)
install=minted.install
b2sums=('b8f1686adeb138c61c232502b10aa420f1054180c5a460e9e5058d40435e13d336c15a044202923bd1acd7b62a7b780d95c62cf1a589181c90b9058712479c43'
        'd0a872e3c36c8364a4819ac597ddaf0be97e0712c9a1871a1e51d1b48ec5928435b7d8eebfc58e0762ee84f150c523b43622654117b2ecd19d13aba7c687e59a')

build() {
  cd $pkgname-$pkgver/source
  yes | tex $pkgname.ins
}

package() {
  cd $pkgname-$pkgver/source
  install -Dm644 $pkgname.sty \
    "$pkgdir/usr/share/texmf/tex/latex/$pkgname/$pkgname.sty"
  install -Dm644 $pkgname.pdf "$pkgdir/usr/share/doc/$pkgname/$pkgname.pdf"
}
